<!-- index.vue -->
<template>
  <div class="wrapper">
    <header class="main-header">

      <!-- Logo -->
      <a href="index2.html" class="logo">
        <!-- mini logo for sidebar mini 50x50 pixels -->
        <span class="logo-mini"><b>R</b>DAS</span>
        <!-- logo for regular state and mobile devices -->
        <span class="logo-lg">科技数据管理系统</span>
      </a>

      <!-- Header Navbar: style can be found in header.less -->
      <nav class="navbar navbar-static-top"role="navigation">
        <!-- Sidebar toggle button-->
        <a href="#" class="sidebar-toggle" data-toggle="offcanvas" role="button">
          <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
        </a>
        <!-- Navbar Right Menu -->
        <div class="navbar-custom-menu">
          <ul class="nav navbar-nav">
            <li>
              <a href="#">
                <span class="hidden-xs">欢迎: 管理员</span>
              </a>
            </li>
            <!-- Messages: style can be found in dropdown.less-->
            <!-- Notifications: style can be found in dropdown.less -->
            <li>
              <a id="id_pwd" href="/account/changepwd/" class="btn" data-toggle="formmodal"
              data-target="#PwdPopup" data-backdrop="static"><i class="fa fa-key"></i></a>
            </li>
            <li>
              <a id="id_logout" class="btn" data-toggle="infomodal" data-target="#LogoutPopup"
              data-backdrop="static"><i class="fa fa-sign-out"></i></a>
            </li>
            <!-- Tasks: style can be found in dropdown.less -->
            <!-- User Account: style can be found in dropdown.less -->

            <!-- Control Sidebar Toggle Button -->
            <!-- <li>
              <a href="#" data-toggle="control-sidebar"><i class="fa fa-gears"></i></a>
            </li> -->
          </ul>
        </div>

      </nav>
    </header>
    <!-- Left side column. contains the logo and sidebar -->
    <aside class="main-sidebar">
      <!-- sidebar: style can be found in sidebar.less -->
      <section class="sidebar">
        <!-- search form -->
        <!--<form action="#" method="get" class="sidebar-form">-->
          <!--<div class="input-group">-->
            <!--<input type="text" name="q" class="form-control" placeholder="Search...">-->
              <!--<span class="input-group-btn">-->
                <!--<button type="submit" name="search" id="search-btn" class="btn btn-flat"><i class="fa fa-search"></i>-->
                <!--</button>-->
              <!--</span>-->
          <!--</div>-->
        <!--</form>-->
        <!-- /.search form -->
        <!-- sidebar menu: : style can be found in sidebar.less -->
        <ul class="sidebar-menu">
          <li class="active">
            <router-link :to="{ path:'/' }">
              <i class="fa fa-home"></i> <span>首页</span>
            </router-link>
            <!--<ul class="treeview-menu">-->
              <!--<li><a href="index.html"><i class="fa fa-circle-o"></i> Dashboard v1</a></li>-->
              <!--<li class="active"><a href="index2.html"><i class="fa fa-circle-o"></i> Dashboard v2</a></li>-->
            <!--</ul>-->
          </li>
          <li class="treeview">
            <a href="#">
              <i class="fa fa-paper-plane"></i>
              <span>技术</span>
              <span class="pull-right-container">
                <!-- <small class="label pull-right bg-green">new</small> -->
              </span>
            </a>
          </li>
          <li class="treeview">
            <a href="http://127.0.0.1:8000/da/search/organization/">
              <i class="fa fa-building-o"></i> <span>机构</span>
              <span class="pull-right-container">
                <!-- <small class="label pull-right bg-green">new</small> -->
              </span>
            </a>
          </li>
          <li class="treeview">
            <a href="http://127.0.0.1:8000/da/search/people/">
              <i class="fa fa-user"></i> <span>人员</span>
              <span class="pull-right-container">
                <!-- <small class="label pull-right bg-green">new</small> -->
              </span>
            </a>
          </li>
          <li class="treeview">
            <a href="#">
              <i class="fa fa-file-text"></i> <span>基础数据</span>
              <span class="pull-right-container">
                <i class="fa fa-angle-left pull-right"></i>
                <!-- <small class="label pull-right bg-green">new</small> -->
              </span>
            </a>
            <ul class="treeview-menu">
                        <li class=" {% if submenu == 104 %} active {% endif %} ">
                            <a href="http://127.0.0.1:8000/da/search/keywords/">
                                <i class="fa fa-circle-o"></i> 专利检索 <small class="label pull-right bg-yellow"></small>
                            </a>
                        </li>
                        <li class=" {% if submenu == 105 %} active {% endif %} ">
                            <a href="http://127.0.0.1:8000/da/search/papers/">
                                <i class="fa fa-circle-o"></i> 论文检索 <small class="label pull-right bg-yellow"></small>
                            </a>
                        </li>
                        <li class=" {% if submenu == 106 %} active {% endif %} ">
                            <a href="http://127.0.0.1:8000/da/search/funds/">
                                <i class="fa fa-circle-o"></i> 基金检索 <small class="label pull-right bg-yellow"></small>
                            </a>
                        </li>
                        <li class=" {% if submenu == 106 %} active {% endif %} ">
                            <a href="http://120.133.6.88:7070/simple.wikipedia.org/wiki/">
                                <i class="fa fa-circle-o"></i> 英文维基 <small class="label pull-right bg-yellow"></small>
                            </a>
                        </li>
             </ul>
          </li>
          <li class="treeview">
            <a href="http://127.0.0.1:8000/enti/showlist/">
              <i class="fa fa-wrench"></i> <span>工具助手</span>
              <span class="pull-right-container">
                <i class="fa fa-angle-left pull-right"></i>
                <!-- <small class="label pull-right bg-green">new</small> -->
              </span>
            </a>
             <ul class="treeview-menu">
                        <li class=" {% if submenu == 107 %} active {% endif %} ">
                            <a href="http://127.0.0.1:8000/enti/showlist/">
                                <i class="fa fa-circle-o"></i> 数据处理 <small class="label pull-right bg-yellow"></small>
                            </a>
                        </li>
                        <li class=" {% if submenu == 108 %} active {% endif %} ">
                            <a href="http://127.0.0.1:8000/enti/showlist/">
                                <i class="fa fa-circle-o"></i> 数据导入 <small class="label pull-right bg-yellow"></small>
                            </a>
                        </li>
             </ul>
          </li>
          <li>
              <router-link to="collection"><i class="fa fa-star"></i> <span>我的收藏</span></router-link>
              <!--span class="pull-right-container">
                <!-- <small class="label pull-right bg-green">new</small> -->
              </span-->
          </li>
          <li class="treeview">
            <a href="#">
              <i class="fa fa-line-chart"></i> <span>系统管理</span>
              <span class="pull-right-container">
                <i class="fa fa-angle-left pull-right"></i>
                <!-- <small class="label pull-right bg-green">new</small> -->
              </span>
            </a>
            <ul class="treeview-menu">
                            <li class=" {% if submenu == 401 %} active {% endif %}"><a href="http://127.0.0.1:8000/manage/user/"><i
                                    class="fa fa-circle-o"></i>用户管理</a>
                            </li>
                           <li class=" {% if submenu == 402 %} active {% endif %}"><a href="http://127.0.0.1:8000/manage/log/"><i
                                    class="fa fa-circle-o"></i>日志管理</a>
                            </li>
            </ul>
          </li>

          <!-- <li class="header">LABELS</li>
          <li><a href="#"><i class="fa fa-circle-o text-red"></i> <span>Important</span></a></li>
          <li><a href="#"><i class="fa fa-circle-o text-yellow"></i> <span>Warning</span></a></li>
          <li><a href="#"><i class="fa fa-circle-o text-aqua"></i> <span>Information</span></a></li> -->
        </ul>
      </section>
      <!-- /.sidebar -->
    </aside>

    <!-- Content Wrapper. Contains page content -->
    <router-view></router-view>
    <!-- /.content-wrapper -->


    <!-- Control Sidebar -->
    <aside class="control-sidebar control-sidebar-dark">
      <!-- Create the tabs -->
      <ul class="nav nav-tabs nav-justified control-sidebar-tabs">
        <li><a href="#control-sidebar-home-tab" data-toggle="tab"><i class="fa fa-home"></i></a></li>
        <li><a href="#control-sidebar-settings-tab" data-toggle="tab"><i class="fa fa-gears"></i></a></li>
      </ul>
      <!-- Tab panes -->
      <div class="tab-content">
        <!-- Home tab content -->
        <div class="tab-pane" id="control-sidebar-home-tab">
          <h3 class="control-sidebar-heading">Recent Activity</h3>
          <ul class="control-sidebar-menu">
            <li>
              <a href="javascript:void(0)">
                <i class="menu-icon fa fa-birthday-cake bg-red"></i>

                <div class="menu-info">
                  <h4 class="control-sidebar-subheading">Langdon's Birthday</h4>

                  <p>Will be 23 on April 24th</p>
                </div>
              </a>
            </li>
            <li>
              <a href="javascript:void(0)">
                <i class="menu-icon fa fa-user bg-yellow"></i>

                <div class="menu-info">
                  <h4 class="control-sidebar-subheading">Frodo Updated His Profile</h4>

                  <p>New phone +1(800)555-1234</p>
                </div>
              </a>
            </li>
            <li>
              <a href="javascript:void(0)">
                <i class="menu-icon fa fa-envelope-o bg-light-blue"></i>

                <div class="menu-info">
                  <h4 class="control-sidebar-subheading">Nora Joined Mailing List</h4>

                  <p>nora@example.com</p>
                </div>
              </a>
            </li>
            <li>
              <a href="javascript:void(0)">
                <i class="menu-icon fa fa-file-code-o bg-green"></i>

                <div class="menu-info">
                  <h4 class="control-sidebar-subheading">Cron Job 254 Executed</h4>

                  <p>Execution time 5 seconds</p>
                </div>
              </a>
            </li>
          </ul>
          <!-- /.control-sidebar-menu -->

          <h3 class="control-sidebar-heading">Tasks Progress</h3>
          <ul class="control-sidebar-menu">
            <li>
              <a href="javascript:void(0)">
                <h4 class="control-sidebar-subheading">
                  Custom Template Design
                  <span class="label label-danger pull-right">70%</span>
                </h4>

                <div class="progress progress-xxs">
                  <div class="progress-bar progress-bar-danger" style="width: 70%"></div>
                </div>
              </a>
            </li>
            <li>
              <a href="javascript:void(0)">
                <h4 class="control-sidebar-subheading">
                  Update Resume
                  <span class="label label-success pull-right">95%</span>
                </h4>

                <div class="progress progress-xxs">
                  <div class="progress-bar progress-bar-success" style="width: 95%"></div>
                </div>
              </a>
            </li>
            <li>
              <a href="javascript:void(0)">
                <h4 class="control-sidebar-subheading">
                  Laravel Integration
                  <span class="label label-warning pull-right">50%</span>
                </h4>

                <div class="progress progress-xxs">
                  <div class="progress-bar progress-bar-warning" style="width: 50%"></div>
                </div>
              </a>
            </li>
            <li>
              <a href="javascript:void(0)">
                <h4 class="control-sidebar-subheading">
                  Back End Framework
                  <span class="label label-primary pull-right">68%</span>
                </h4>

                <div class="progress progress-xxs">
                  <div class="progress-bar progress-bar-primary" style="width: 68%"></div>
                </div>
              </a>
            </li>
          </ul>
          <!-- /.control-sidebar-menu -->

        </div>
        <!-- /.tab-pane -->

        <!-- Settings tab content -->
        <div class="tab-pane" id="control-sidebar-settings-tab">
          <form method="post">
            <h3 class="control-sidebar-heading">General Settings</h3>

            <div class="form-group">
              <label class="control-sidebar-subheading">
                Report panel usage
                <input type="checkbox" class="pull-right" checked>
              </label>

              <p>
                Some information about this general settings option
              </p>
            </div>
            <!-- /.form-group -->

            <div class="form-group">
              <label class="control-sidebar-subheading">
                Allow mail redirect
                <input type="checkbox" class="pull-right" checked>
              </label>

              <p>
                Other sets of options are available
              </p>
            </div>
            <!-- /.form-group -->

            <div class="form-group">
              <label class="control-sidebar-subheading">
                Expose author name in posts
                <input type="checkbox" class="pull-right" checked>
              </label>

              <p>
                Allow the user to show his name in blog posts
              </p>
            </div>
            <!-- /.form-group -->

            <h3 class="control-sidebar-heading">Chat Settings</h3>

            <div class="form-group">
              <label class="control-sidebar-subheading">
                Show me as online
                <input type="checkbox" class="pull-right" checked>
              </label>
            </div>
            <!-- /.form-group -->

            <div class="form-group">
              <label class="control-sidebar-subheading">
                Turn off notifications
                <input type="checkbox" class="pull-right">
              </label>
            </div>
            <!-- /.form-group -->

            <div class="form-group">
              <label class="control-sidebar-subheading">
                Delete chat history
                <a href="javascript:void(0)" class="text-red pull-right"><i class="fa fa-trash-o"></i></a>
              </label>
            </div>
            <!-- /.form-group -->
          </form>
        </div>
        <!-- /.tab-pane -->
      </div>
    </aside>
    <!-- /.control-sidebar -->
    <!-- Add the sidebar's background. This div must be placed
         immediately after the control sidebar -->
    <div class="control-sidebar-bg"></div>
  </div>
</template>
<script>
  export default {
  data() {
    return {

    }
  },
  components: {

  },
  mounted(){
    var sUserAgent = navigator.userAgent.toLowerCase();
    var bIsIpad = sUserAgent.match(/ipad/i) == "ipad";
    var bIsIphoneOs = sUserAgent.match(/iphone os/i) == "iphone os";
    var bIsMidp = sUserAgent.match(/midp/i) == "midp";
    var bIsUc7 = sUserAgent.match(/rv:1.2.3.4/i) == "rv:1.2.3.4";
    var bIsUc = sUserAgent.match(/ucweb/i) == "ucweb";
    var bIsAndroid = sUserAgent.match(/android/i) == "android";
    var bIsCE = sUserAgent.match(/windows ce/i) == "windows ce";
    var bIsWM = sUserAgent.match(/windows mobile/i) == "windows mobile";
    if (bIsIpad || bIsIphoneOs || bIsMidp || bIsUc7 || bIsUc || bIsAndroid || bIsCE || bIsWM) {
      alert(1);
        $("a[href!='#']").attr("data-toggle","offcanvas");
    }else{
      // alert(2);
    }
  },
  methods: {}
}
</script>
